package observer;

import java.util.Vector;

public abstract class Observable {

	protected static Vector<Observer> ventanas = new Vector<Observer>();
	
	public void addObserver(Observer observer)
	{
		ventanas.add(observer);
	}
	
	public void removeObserver(Observer observer)
	{
		ventanas.remove(observer);
	}

	public void notifyObservers()
	{
		for(Observer ventana : ventanas)
			ventana.update();
	}
}
